package com.epoint.configuration;

import com.epoint.springtest.Pet;
import com.epoint.springtest.User;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.filter.OrderedCharacterEncodingFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CharacterEncodingFilter;

@EnableConfigurationProperties(User.class)
@Configuration(proxyBeanMethods = true)
public class Configuration1 {

//    @Bean
//    public Pet pet001(){
//        Pet pet = new Pet();
//        pet.setName("小猪");
//        return pet;
//    }
//
//    @Bean
//    @ConditionalOnBean(Pet.class)
//    public User User001(){
//        return new User("纪宽豪", 27, pet001());
//    }

}
